package com.jd.ty.service;

import java.util.List;

import com.jd.ty.dao.IBaseDAO;
import com.jd.ty.dao.ProjectAttrbuteDAO;
import com.jd.ty.dao.constant.QueryConstants;
import com.jd.ty.dao.util.HqlCriterions;
import com.jd.ty.pojo.CustomerOrder;
import com.jd.ty.pojo.ProjectAttribute;
import com.jd.ty.service.exception.ServiceException;

public class ProjectService {
	private ProjectAttrbuteDAO projectAttrbuteDAO;

	public List<ProjectAttribute> getProjectAttrsByParentId(Long parentId) {
		HqlCriterions hc = new HqlCriterions();
		hc.and(QueryConstants.ProjectAttribute.PROJECT_TYPE+"."+QueryConstants.Dictionary.DICTIONARY_ID,parentId,
				QueryConstants.EQ);
		
		return projectAttrbuteDAO.getByQuery(hc.getHqlString());
	}
	
	public void setProjectAttrbuteDAO(ProjectAttrbuteDAO projectAttrbuteDAO) {
		this.projectAttrbuteDAO = projectAttrbuteDAO;
	}
	public ProjectAttribute get(long id){
		return (ProjectAttribute)projectAttrbuteDAO.getById(id);
	}



}
